#ifndef MAINTAIN_MENU2_H
#define MAINTAIN_MENU2_H

#include <QMainWindow>
#include "maintain_menu.h"

class Maintain_Menu2 : public QMainWindow
{
    Q_OBJECT
public:
    explicit Maintain_Menu2(QWidget *parent = 0);

    QPushButton *theBtn;
    QStringList strList;
    QStringList strList2;
    QStringList strList3;
    QTimer *timer;
    QTimer *timer2;
    QTimer *timer3;//尝试对屏幕双击进行

    void SetRange(double min, double max);//设置范围
           int ReadValue();//获取当前值
           void SetValue(int value); //设定当前值
           void mousePressEvent(QMouseEvent *Mouse);   //按下
           void mouseMoveEvent(QMouseEvent *Mouse);    //移动
           void mouseReleaseEvent(QMouseEvent *);      //松开
           void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;             //画图程序
           void paintNum(QPainter &painter, int num, int deviation);//画图程序，调用的，写字程序
//           bool eventFilter(QObject *watched, QEvent *event);
           void keyPressEvent(QKeyEvent *event);
           void choose_OK();//关于OK键按下后的反应
signals:
    void CurrentValueChanged(int value);
    void sendText(QString text);//以信号的形式将输入文本发出去

private:
    int Now_Value;//当前值
    int Min_Value;//最小值
    int Man_Value;//最大值
    bool isDragging;//鼠标按下标志位
    int Mouse_Press;//鼠标拖动值
    int Deviation;//显示偏移量
    int double_click=0;//双击的计时器
public slots:
};

#endif // MAINTAIN_MENU2_H
